﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SectionEduReport.aspx.cs" Inherits="School_Report_SectionEduReport" %>

<%@ Register Src="../../Custom/ucEduSubject.ascx" TagName="ucEduSubject" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>分数段(局)</title>
<link href="../../Common/css/main.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../../Common/Js/jquery.js"></script>
<script type="text/javascript" src="../../Common/Js/common.js"></script>
<script type="text/javascript" src="../../Common/Js/msg.js"></script>
<script type="text/javascript">

//选中行高亮
function SetHightLight(obj)
{
    if(obj != null) 
        obj.style.backgroundColor = "#fffccf";
        
    var table = document.getElementById('reportTable');
    for(var i =0 ; i < table.rows.length;i++)
    {
        var row = table.rows[i];
        if(row != null && row.rowIndex != obj.rowIndex)
        {
            row.style.backgroundColor = "#ffffff";
        }
    }
}

//查询
function Select()
{
   document.getElementById('txtSubjectId').value = currSubjectId;
   document.getElementById('btnSelect').click();
}

//过滤分科
function FilterClassType()
{
    var value = event.srcElement.value;
    document.getElementById('txtClassType').value = value;
}
    function ShowSet()
    {
        document.getElementById("parfrm").src="UserSection.aspx";
        ShowPopForm("upInputPop", "upInputPopTitle","分数段分析设置")   ; 
    }
function onsubChange()
{
    Select();
}
    function MyClosePopForm()
    {
        if(document.getElementById("parfrm").contentWindow.settingChange)
        {
            document.getElementById("parfrm").contentWindow.SetDoWhat(nowClose);
            document.getElementById("parfrm").contentWindow.OnclosePage(nowClose);
        }
        else
        {
            nowClose();
        }
       
    }
    function nowClose()
    {
        Select();
         ClosePopForm('upInputPop');
         document.getElementById("parfrm").src="";
    }
</script>
</head>
<body  scroll="no">
<div style="overflow-y:auto;overflow-x:none;height:98%;">
    <form id="form1" runat="server">
    <div class="mainWarp">
    <div class="pageBody" style="height:96%;">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
                 </asp:ScriptManager>
                    <table >
                    <tr>
                    <td  style="padding-left:4px;">
                            <ul class="butList">
                                科目：<uc1:ucEduSubject ID="UcSubject1" runat="server" />
                                <%--<li><input type="button" value="查询" onclick="Select();" class="commonBut" /></li>--%>
                                <li><input type="button" value="分数段分析设置" onclick="ShowSet();"  class="commonBut" /></li>
                           </ul>
                    </td>
                    <td style="padding-left:10px;">
                        <asp:UpdateProgress ID="UpdateProgress1"  runat="server" AssociatedUpdatePanelID="UpdatePanel1"><progresstemplate><img src="../../Common/images/ajaxloading.gif" /></progresstemplate></asp:UpdateProgress>
                    </td>
                    </tr>
                    </table>

                 <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        
                         <asp:Repeater ID="repeatEduKind" runat="server">
                            <HeaderTemplate>
                            <div style="overflow-y:auto;overflow-x:none;height:98%;">
                                <table id="reportTable" border="0" cellpadding="0" style="width:98%" cellspacing="1" class="useList1">
                                        <%# GetTH()%>
                                   
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr onclick="SetHightLight(this)" style="background-color: White;">
                                    <%# GetTD((string)Eval("SchoolMark"), (string)Eval("SchoolName"))%>
                                </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                                <tr onclick="SetHightLight(this)" style="background-color: White;">
                                    <%# GetAddUp()%>
                                </tr>
                                </table></div>
                            </FooterTemplate>
                        </asp:Repeater>
                    </ContentTemplate>
                    <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btnSelect" EventName="Click" />
                           
                    </Triggers>
                 </asp:UpdatePanel>
                 <div style="display: none;">
                    <asp:Button ID="btnSelect" runat="server" Text="查询" OnClick="btnSelect_Click"/>
                    <asp:TextBox ID="txtSubjectId" runat="server" />
                 </div>
            </div>
        </div>
        <div id="upInputPop" class="layoutWarp" style="display: none; width:600px;height:290px;">
         <div class="title" >
	        <span id="upInputPopTitle"></span>
            <a title="关闭" onclick="MyClosePopForm();">关闭</a>
               
          </div>
        <iframe src="" name="ifram" id="parfrm" style="height: 85%;width: 95%;overflow:hidden;" frameborder="0"   ></iframe>
        
    </div>
    </form>
    </div>
</body>
</html>
<script language="javascript">
    setSubjectOnChangeFun(onsubChange);
</script>